package step2;

public class Client {
    public static void main(String[] args) {
        Experiment experiment,copyExperiment=null;
        Codefile codefile =new Codefile();
        codefile.setFilepath("D://Code/Code.java");
        experiment=new Experiment(codefile);
        experiment.setName("序列化深度克隆实验");
        experiment.setDescribe("原型模式");
        experiment.setTeacher("张三");
        try{
            copyExperiment=(Experiment)experiment.DeepClone();
            copyExperiment.setTeacher("李四");
            System.out.println(experiment.toString());
            System.out.println(copyExperiment.toString());
            System.out.println((experiment.getFile() == copyExperiment.getFile()));
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

    }
}
